import sqlalchemy.types
import sqlalchemy.schema
from zope.interface import implements
from lottery.data import ORMBase
from lotomidas.dexterity import _

from z3c.saconfig import Session

from lottery.data.interfaces import IMegasenaGet
from zope.interface import Interface
from zope import schema

class Megasena(ORMBase):
    
    __tablename__ = 'megasena'
    
    NumeroId = sqlalchemy.schema.Column(
        sqlalchemy.types.Integer(),
        primary_key=True,
        autoincrement=True,
        )
        
    numero = sqlalchemy.schema.Column(
                    sqlalchemy.types.Integer(),
                    )

class MegasenaGet():
    implements(IMegasenaGet)
    def getNumber(self):
        return Session.execute("select * from megasena")
